package demo;

 interface Ikou{
    //抽象方法
    public abstract void draw();
}
class Cycle implements Ikou{
    @Override
    public void draw() {
        System.out.println("⭕");
    }
}
class flower implements Ikou{
    @Override
    public void draw() {
        System.out.println("❀");
    }
}
public class Test {
     public static void drawmpe(Ikou ikou){
         ikou.draw();
     }
    public static void main(String[] args) {
        Ikou ikou = new Cycle();
        Ikou ikou1 = new flower();
        drawmpe (ikou);
        drawmpe (ikou1);
        System.out.println("=============");

        Ikou []ikous ={new Cycle(),new flower()};
        for (Ikou ikou2:ikous){
            ikou2.draw();

        }


    }

}
